package com.sys.basics.jobs;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.Date;

@Slf4j
@Component(value = "myJobTest")
public class MyJob {
    public void execute() {
        log.info("定时任务测试开始{}", new Date().toString());
        try {
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        log.info("定时任务测试结束{}", new Date().toString());
    }
}
